<!-- 以下是查询结果 -->

<div id="rst-div" style="overflow-x: auto;overflow-y: auto;">
  <table>
    <tr>
      <th><%= t 'activerecord.attributes.motorcade.vehicle_no' %></th>
      <th><%= t 'activerecord.attributes.motorcade.driver_name' %></th>
      <th><%= t 'activerecord.attributes.motorcade.driver_phone' %></th>
      <th><%= t 'activerecord.attributes.motorcade.operate' %></th>

      <%#
        <th>车辆类型</th>
        <th>目的地</th>
        <th>经度</th>
        <th>纬度</th>
        <th>分组</th>
      %>
    </tr>
    <% if @vehicles && @vehicles.size > 0 %>
        <% @vehicles.each do |vehicle| %>
            <tr id="line_<%= vehicle.vehicle_no %>" class="vehicle_row">
              <td style="width: 60px" class="vehicle_no"><%= vehicle.vehicle_no %></td>
              <td style="width: 60px" class="driver_name"><%= vehicle.driver_name %></td>
              <td style="width: 95px" class="driver_phone"><%= vehicle.driver_phone %></td>
              <td align="center">
                <a href="javaScript:void(0);" id="track_link_<%= vehicle.vehicle_no %>" onclick="toggleTrack('<%= vehicle.vehicle_no %>', 'track')" class="track_btn">
                  <img src="/assets/map/track.png"/>
                </a><%# 跟踪 %>
                <a href="javaScript:void(0);" id="cancel_track_<%= vehicle.vehicle_no %>" onclick="toggleTrack('<%= vehicle.vehicle_no %>', 'stopTrack')" style="display: none;" class="cancel_track_btn">
                  <img src="/assets/map/cancel_track.png">
                </a><%# 取消跟踪 %>
                <a  href="javaScript:void(0);" class="mark_vehicle" onclick="markVehicle('<%= vehicle.vehicle_no %>')">
                  <img src="/assets/map/locate.png">
                </a><%# 定位 %>
                <a href="javaScript:void(0);" id="history_btn_<%= vehicle.vehicle_no %>" onclick="motor_history('<%= vehicle.vehicle_no %>', event)" class="history_btn">
                  <img src="/assets/map/history.png">
                </a><%# 轨迹 %>
              </td>
              <input type="hidden" class="address address-<%= vehicle.vehicle_no %>" value=""/><%# 地址 %>
              <td style="display:none;">
                <input type="hidden" class="vehicle_gps_<%= vehicle.vehicle_no %>" value="<%=  gps_str @gpses[vehicle.vehicle_no]%>"/>
                <input type="hidden" class="vehicle_type" value="<%= vehicle.vehicle_type %>"/><%# 车型 %>
                <input type="hidden" class="destination" value="<%= vehicle.destination %>"/><%# 目的地 %>
                <input type="hidden" class="longitude" value="<%= vehicle.longitude %>"/><%# 经度 %>
                <input type="hidden" class="latitude" value="<%= vehicle.latitude %>"/><%# 纬度 %>
                <input type="hidden" class="speed" value=""/><%# 速度 %>
                <input type="hidden" class="groups" value="<%= vehicle.groups %>"/><%# 分组 %>

              </td>
            </tr>
        <% end %>
    <% else %>
       <tr><td colspan="4">没有记录</td></tr>
    <% end %>
  </table>
  <% session[:max_page] = @vehicles.total_pages %>
  <%= will_paginate @vehicles, :style => 'font-size: small' %>
</div>

